package com.bit.ioc.controller;

import com.bit.ioc.config.UserConfig;
import com.bit.ioc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;


@Controller
public class UserController3 {


    private UserService userService;
    private UserConfig userConfig;

    public void sayHi(){
        System.out.println(userService);
        userService.doService();
        userConfig.doConfig();
        System.out.println("UserController.sayHi....");
    }

    @Autowired
    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    @Autowired
    public void setUserConfig(UserConfig userConfig) {
        this.userConfig = userConfig;
    }
}
